import {BrowserModule} from '@angular/platform-browser';
import {LOCALE_ID, NgModule} from '@angular/core';

import {AppComponent} from './app.component';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {FormsModule} from '@angular/forms';
import {HttpClientModule} from '@angular/common/http';
import {NgZorroAntdModule, NZ_I18N, zh_CN} from 'ng-zorro-antd';
import {registerLocaleData} from '@angular/common';
import zh from '@angular/common/locales/zh';
import {SetupModule} from './pages/setup/setup.module';
import {AppRoutingModule} from './app-routing.module';
import {MainModule} from './pages/main/main.module';
import { DemoComponent } from './pages/demo/demo.component';

registerLocaleData(zh); // 注册本地化数据

@NgModule({
  // 定义组件/指令/管道等
  declarations: [
    AppComponent,
    DemoComponent
  ],
  // 导入模块
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    HttpClientModule,
    NgZorroAntdModule,
    AppRoutingModule,
    SetupModule,
    MainModule
  ],
  // 提供程序
  providers: [
    {provide: LOCALE_ID, useValue: 'zh-Hans'},
    {provide: NZ_I18N, useValue: zh_CN}
  ],
  // 启动项
  bootstrap: [AppComponent]
})
export class AppModule {
}
